const _ = require('lodash')

const reverse = ary => ary.reverse();

const first = ary => ary[0];

const toUpper = str => str.toUpperCase();

const fn1 = _.flowRight(toUpper, first, reverse);

console.log(fn1(['a', 'b', 'c', 'd']))